package club.hicode.daydayup.byteman;

import club.hicode.daydayup.lambda.Person;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 对于 Byte 的控制层
 *
 * @author Liu Chunfu
 * @date 2018-05-07 上午10:37
 **/
@RestController
public class ByteController {

    @PostMapping("/byte")
    public BytePerson bytePerson(@RequestBody BytePerson bytePerson) {

        bytePerson.setName("66999");
        return bytePerson;
    }

    @PostMapping("/p")
    public Person personTest(@RequestBody Person person) {
        person.setId("5555");
        return person;
    }
}
